package 泛型;

public class FanXing<T1,T2> {
    T1 a;
    T2 b;

    public T1 getA() {
        return a;
    }

    public void setA(T1 a) {
        this.a = a;
    }

    public T2 getB() {
        return b;
    }

    public void setB(T2 b) {
        this.b = b;
    }
    public static void main(String[]args){
        FanXing<Integer,Float>f1=new FanXing<>();
        f1.setA(10);
        f1.setB(2.1f);
        int x=f1.getA();
        float y=f1.getB();
        System.out.println(x+"    "+y);
    }
}

